package main

import (
	"fmt"
	"go_rpc/gorpc/client_proxy"
)

func main() {
	/*client, err := rpc.Dial("tcp", "localhost:25555")
	if err != nil {
		panic("连接失败")
	}
	defer client.Close()
	var reply = new(string)
	err = client.Call(handler.HelloService+".Hello", "World", reply)
	if err != nil {
		fmt.Println("调用失败")
	}
	fmt.Println(*reply)*/
	client := client_proxy.NewHelloServiceClient("tcp", "localhost:25555")
	//reply := new(string)

	reply := ""
	err := client.Hello("zhangsan", &reply)
	if err != nil {
		fmt.Println("err: ", err)
	}
	fmt.Println("reply:", reply)
}
